<!-- myapp/templates/myapp/base.html -->
<!DOCTYPE html>
<html>
<head>
    <title>{% block title %}My Site{% endblock %}</title>
    <style>
        .hidden-div {
            padding: 20px;
            background-color: #f0f0f0;
            border: 1px solid #ddd;
            margin: 20px 0;
        }
        .auth-links {
            margin: 20px 0;
        }
    </style>
</head>
<body>
    <div class="auth-links">
        {% if user.is_authenticated %}
            欢迎, {{ user.nickname }}! <a href="{% url 'logout' %}">退出登录</a>
        {% else %}
            <a href="{% url 'login' %}">登录</a>
        {% endif %}
    </div>
    
    {% block content %}{% endblock %}
</body>
</html>
